/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * LoadCDPanel.java
 *
 * Created on 06-Dec-2009, 23:16:53
 */
package edu.iyte.ceng431.hw03.cdplayer.view;

import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.awt.event.ActionListener;

/**
 *
 * @author CUNEYT
 */
public class LoadCDPanel extends javax.swing.JFrame {

    /** Creates new form LoadCDPanel and places it horizontally in center of the screen
     * and vertically just below the MainFrame*/
    public LoadCDPanel(MainFrame m) {
        initComponents();
        Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
        setLocation(center.x - this.getWidth()/2,center.y + m.getHeight()/2);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        loadButton = new javax.swing.JButton();

        setTitle("Open CD File");
        setMinimumSize(new java.awt.Dimension(225, 240));
        setResizable(false);
        getContentPane().setLayout(null);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/iyte/ceng431/hw03/cdplayer/view/images/drawer.png"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 0, 200, 142);

        loadButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/iyte/ceng431/hw03/cdplayer/view/images/load.png"))); // NOI18N
        getContentPane().add(loadButton);
        loadButton.setBounds(70, 150, 79, 55);
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JButton loadButton;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the loadButton
     */
    public javax.swing.JButton getLoadButton() {
        return loadButton;
    }

    /**
     * @param loadButton the loadButton to set
     */
    public void setLoadButton(javax.swing.JButton loadButton) {
        this.loadButton = loadButton;
    }

    public void addLoadButtonActionPerformed(ActionListener actionListener)
    {
        loadButton.addActionListener(actionListener);
    }
}
